﻿using scripts.net;

namespace scripts.logic
{
	public class Player
	{
		public string id = "";

		public ClientState state;

		public PlayerData data;

		//所在房间id
		//不在房间为负数
		public int roomId = -1;

		//坐标
		public float x;
		public float y;
		public float z;
		//旋转
		public float ex;
		public float ey;
		public float ez;

		//血量
		public float hp = 100.0f;
		//护甲
		public float armor = 100.0f;

		//阵营
		public int camp;

		public Player(ClientState state)
		{
			this.state = state;
		}

		//向这个客户端发送信息
		public void Send(BaseMsg baseMsg)
		{
			NetManager.Send(state, baseMsg);
		}

	}
}
